package com.mygame.common.msg;


import java.util.HashMap;
import java.util.Map;

public enum EventEnum {
    GET_PLAYER_INFO_EVENT(1, "GetPlayerInfoEvent", ServiceEnum.GAME_LOGIC),
    ;


    public int id;
    public String cmdName;
    public ServiceEnum service;

    EventEnum(int id, String cmd, ServiceEnum service) {
        this.cmdName = cmd;
        this.id = id;
        this.service = service;
    }

    public static Map<Integer, EventEnum> cmdMap = new HashMap<>();

    static {
        for (EventEnum cmd : EventEnum.values()) {
            cmdMap.put(cmd.id, cmd);
        }
    }


    public static EventEnum find(int cmdId) {
        return cmdMap.get(cmdId);
    }

}
